<!DOCTYPE html>
<html class="no-js" lang="">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />

    <title>量子视觉科技</title>
    <meta name="description" content="国内首个独角兽大会，将邀请30位独角兽公司CEO共同发布《创投宣言》，在创业的寒冬中激励创业者保持战斗，继续前行。是创业时代的关键时期中一场注定被纪录的巅峰盛会。" />
    <style type="text/css">
        @-ms-viewport {
            width: device-width;
        }
    </style>
    <link rel="stylesheet" href="./styles/main.css" />
  </head>
  <body>
    <div style="height:0;width:0;overflow:hidden;"><img src="./images/thumb.jpg" alt=""></div>
    <!--[if lte IE 8]>
      <p class="browsehappy">您正在使用 <strong>过时的</strong> 浏览器. 请 <a href="http://browsehappy.com/">更新您的浏览器</a> 来增加您的上网体验.</p>
    <![endif]-->

    <script src="./js/vr/krpano.js"></script>
    <script src="./js/jquery-2.1.4.min.js"></script>
    <script src="./js/retina.js"></script>

    <!-- content -->
    <div class="container">
        <h1 class="maintitle">
            <img src="./images/header.png" alt="">
        </h1>
        <div class="stageWraper">
            <div class="stage">
              <i class="p_l"></i>
              <i class="p_r"></i>
              <i class="p_t"></i>
              <i class="p_b"></i>
              <div class="screen_bg">
                <div id="pano">
                  <noscript>请开启 javascript</noscript>
                </div>
              </div>
            </div>
        </div>
        <footer class="footer">
            <img src="./images/footer.png" alt="">
        </footer>
    </div>
    <!-- end content -->

    <script>
        $(function(){
            var u = navigator.userAgent;
            var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
            var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
            window.currentNum = "";
            var timer="";
            var domain = "h5.visiondk.com";
            window.base = "http://"+domain+"/mp4/stream_";
            $.ajax({url:"http://"+domain+"/mp4/current.txt",success:function(data){
                currentNum=data;
            },async: false});

            var settings = {};
            settings["onstart"] = "trace('this is a js traced on start...')";
            settings["posterurl_low"] = "../../images/img";
            settings["posterurl_high"] = "../../images/img";
            settings["videourl_low"] = base+currentNum;
            settings["videourl_high"] =base+currentNum;

            if(isiOS){
                settings["soundurl"] =base+currentNum;
            }

            if (!domain) {
                var errmsg = 'Error';
            } else {
                embedpano({
                    vars: settings,
                    swf: "js/vr/krpano.swf",
                    id: "krpanoSWFObject",
                    xml: "js/vr/vrlive.xml",
                    target: "pano",
                    mobilescale: 0.4,
                    passQueryParameters: true,
                    bgcolor: "#000000",
                    html5: "prefer",
                    webglsettings: {
                        preserveDrawingBuffer: false,
                        depth: false,
                        stencil: false
                    }
                });
            }

            function selecthtml5usage() {
                if (navigator.userAgent.indexOf("Android") >= 0 && navigator.userAgent.indexOf("QQ") >= 0) {
                    return "auto+css3d"
                } else {
                    return "auto";
                }
            }


            if (isAndroid || isiOS) {
                calculateHeight();
                $(window).on('resize', function(){
                    throttle(calculateHeight);
                });
            }
        })
        
        // 截流函数
        function throttle(method, context) {
          clearTimeout(method.tId);
          method.tId = setTimeout(function () {
              method.call(context);
          }, 100);
        };
        // 计算宽度，播放器横屏全屏显示
        function calculateHeight(){
            winHeight = $(window).height();
            winWidth = $(window).width();
            if (winWidth >= winHeight) {
                $("#krpanoSWFObject").css({
                    'position':'fixed',
                    'top':0,
                    'bottom':0,
                    'left':0,
                    'right':0
                });
            }else{
                $("#krpanoSWFObject").css({
                    'position':'relative',
                    'top':'auto',
                    'bottom':'auto',
                    'left':'auto',
                    'right':'auto'
                });
            }
        };
    </script>

    <!-- <script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1259552846'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s4.cnzz.com/z_stat.php%3Fid%3D1259552846' type='text/javascript'%3E%3C/script%3E"));</script> -->
  </body>
</html>
